function dcost = costDer(data, labels, params)
        dcost = zeros(1,size(params,2));
        order = randperm(size(labels,1));
        for(i=1:size(order,2))
            #cr for current row
            cr = order(1,i);
            dcost=dcost.+(( hypothesis(data(cr,:), params)-labels(cr,1) )* data(cr,:));               
        end;
end;
